package com.sskj.mine.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.common.util.ToastUtil;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.ui.activity.IdentityVerifyActivity;


public class IdentityVerifyActivityPresenter extends BasePresenter<IdentityVerifyActivity> {

    public void identity(String name, String card_id, String front_img, String back_img) {
        httpService.identity(name, card_id, front_img, back_img)
                .execute(new JsonCallBack<HttpData>(this) {
                    @Override
                    public void onSuccess(Response<HttpData> response) {
                        HttpData httpData = response.body();
                        ToastUtil.showShort(httpData.getMsg());
                        if (httpData.getStatus() == HttpConfig.OK) {

                            mView.identitySuccess();
                        }
                    }
                });
    }

}
